package org.finalministry.gui.action;

import javax.swing.JDialog;

import org.finalministry.gui.GuiMain;
import org.finalministry.gui.components.ColorSchema;
import org.finalministry.gui.panels.NewCongregationPanel;

public class NewCongregationAction extends GuiActionBase {

	public NewCongregationAction(GuiMain guiMain) {
		super(guiMain);
	}

	@Override
	public void performAction() {
		NewCongregationPanel congregationPanel = new NewCongregationPanel();

		JDialog dialog = new JDialog(getGuiMain());
		dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		dialog.setBackground(ColorSchema.getBackgroundColor());
		dialog.setTitle("New Congregation");
		dialog.add(congregationPanel);
		dialog.setBounds(100, 100, congregationPanel.getPreferredSize().width + 100, congregationPanel.getPreferredSize().height + 100);
		dialog.setVisible(true);
	}

}
